﻿#ifndef UPPERDEVICE_H
#define UPPERDEVICE_H

#include "System/System.h"
#include "Device/BaseDevice.h"
#include "Protocol/CloudProtocol.h"
#include "Protocol/SWKNXProtocol.h"

#include "File/Ini/LocalIni.h"
#include "File/Xml/MacXml.h"

#include "Command/CloudProtocol/ResponseCmd.h"
#include "Command/CloudProtocol/UpperSearchCmd.h"
#include "Command/CloudProtocol/UpperSearchResponseCmd.h"
#include "Command/CloudProtocol/UpperSetMacParamCmd.h"
#include "Command/CloudProtocol/UpperSetNetParamCmd.h"
#include "Command/CloudProtocol/UpperSetTempNetParamCmd.h"
#include "Command/CloudProtocol/DownloadFileCmd.h"
#include "Command/CloudProtocol/RebootCmd.h"
#include "Command/CloudProtocol/DownloadFileResultCmd.h"
#include "Command/CloudProtocol/UpperSetKNXMacCmd.h"
#include "Command/SWKNXProtocol/setKNXMacCmd.h"
#include "Command/CloudProtocol/UpperSetKNXMacResponseCmd.h"

#include "Function/DownloadFileFunc.h"
#include "Function/DownloadFileResultFunc.h"
#include "File/Xml/Zigbee3ListXml.h"

class UpperDevice : BaseInterface<UpperDevice>
{
    Q_OBJECT
public:
    Q_INVOKABLE explicit UpperDevice(QObject *parent = 0);
    CloudProtocol *cloudProtocol;
    SWKNXProtocol *swKNXProtocol;
    void upperSearchCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void upperSetMacParamCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void upperSetNetParamCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void upperSetTempNetParamCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void downloadFileCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void rebootCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);

    void downloadFileResultFuncHandle(QSharedPointer<BaseFunc> sharedFunc);

    void upperSetKNXMacCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);

};

#endif // UPPERDEVICE_H
